{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "讲师： 沈福利\n",
    "\n",
    "本章节主要目标\n",
    "\n",
    "1. 绘制一个简单图表\n",
    "2. 不同乘客的仓位等级人数分布\n",
    "3. 不同的上船港口乘客仓位等级分布"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 柱状图 Bar"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "直方图： 可以看到单变量的数值分布\n",
    "\n",
    "柱状图： 可以帮助我们看到不同的类别的特征分布 , 宽度表示类别；长度：表示每个类别的频数 "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 导入库"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 绘制一个简单的图表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<BarContainer object of 4 artists>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAADTFJREFUeJzt3X2MZfVdx/H3R7YrXSgpdW8rT9uhWtCWNFaHpg+hIpRkFSwmmgiRCkoyWtNaH2rdpkZi4h9rS7RNajSTdqVJEWIQK5Y+QEAkRorMIi0LW6RWpAvYHSTVtiq49usfe5vgMLP34ZzZO/Pj/UrIzj337JxvTpj3/vbsvfekqpAkbX7fMesBJEn9MOiS1AiDLkmNM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KgS1IjDLokNcKgS1IjDLokNeL/ACmOM7tgL5u4AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Bar 数据格式\n",
    "x = ['x1','x2','x3','x4']\n",
    "y = [5,4,12,17]\n",
    "\n",
    "# matploblib Bar\n",
    "plt.bar(x,y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "x,y 两个数组，分别代表的是类别和次数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 泰坦尼克号的数据分析"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "# 设置字体大小和图表的大小\n",
    "plt.rc('figure',figsize = (12,9))\n",
    "plt.rc('font',size = 15)\n",
    "# 中文乱码问题\n",
    "from matplotlib.font_manager import _rebuild\n",
    "_rebuild()\n",
    "plt.rcParams['font.sans-serif']=[u'SimHei']\n",
    "plt.rcParams['axes.unicode_minus']=False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>survived</th>\n",
       "      <th>pclass</th>\n",
       "      <th>sex</th>\n",
       "      <th>age</th>\n",
       "      <th>sibsp</th>\n",
       "      <th>parch</th>\n",
       "      <th>fare</th>\n",
       "      <th>embarked</th>\n",
       "      <th>class</th>\n",
       "      <th>who</th>\n",
       "      <th>adult_male</th>\n",
       "      <th>deck</th>\n",
       "      <th>embark_town</th>\n",
       "      <th>alive</th>\n",
       "      <th>alone</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>male</td>\n",
       "      <td>22.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>7.2500</td>\n",
       "      <td>S</td>\n",
       "      <td>Third</td>\n",
       "      <td>man</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>no</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>female</td>\n",
       "      <td>38.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>71.2833</td>\n",
       "      <td>C</td>\n",
       "      <td>First</td>\n",
       "      <td>woman</td>\n",
       "      <td>False</td>\n",
       "      <td>C</td>\n",
       "      <td>Cherbourg</td>\n",
       "      <td>yes</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>female</td>\n",
       "      <td>26.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7.9250</td>\n",
       "      <td>S</td>\n",
       "      <td>Third</td>\n",
       "      <td>woman</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>yes</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>female</td>\n",
       "      <td>35.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>53.1000</td>\n",
       "      <td>S</td>\n",
       "      <td>First</td>\n",
       "      <td>woman</td>\n",
       "      <td>False</td>\n",
       "      <td>C</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>yes</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>male</td>\n",
       "      <td>35.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8.0500</td>\n",
       "      <td>S</td>\n",
       "      <td>Third</td>\n",
       "      <td>man</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Southampton</td>\n",
       "      <td>no</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   survived  pclass     sex   age  sibsp  parch     fare embarked  class  \\\n",
       "0         0       3    male  22.0      1      0   7.2500        S  Third   \n",
       "1         1       1  female  38.0      1      0  71.2833        C  First   \n",
       "2         1       3  female  26.0      0      0   7.9250        S  Third   \n",
       "3         1       1  female  35.0      1      0  53.1000        S  First   \n",
       "4         0       3    male  35.0      0      0   8.0500        S  Third   \n",
       "\n",
       "     who  adult_male deck  embark_town alive  alone  \n",
       "0    man        True  NaN  Southampton    no  False  \n",
       "1  woman       False    C    Cherbourg   yes  False  \n",
       "2  woman       False  NaN  Southampton   yes   True  \n",
       "3  woman       False    C  Southampton   yes  False  \n",
       "4    man        True  NaN  Southampton    no   True  "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titanic = pd.read_csv('data/titanic.csv',index_col=0)\n",
    "titanic.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 不同乘客的仓位等级人数分布"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "# class 仓位等级: 类别？\n",
    "# survived 幸存的人数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['First', 'Second', 'Third'], dtype=object)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.unique(titanic['class'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "class\n",
       "First     136\n",
       "Second     87\n",
       "Third     119\n",
       "Name: survived, dtype: int64"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titanic_class = titanic.groupby(by = 'class')['survived'].sum()\n",
    "titanic_class.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([136,  87, 119])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titanic_class.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x =  ['First' 'Second' 'Third']\n",
      "y =  [136  87 119]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAs0AAAIOCAYAAABDMzCbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAG+ZJREFUeJzt3XuQpXdd5/HPl4yAXJZbOkIIYQLsLlGWiw4CSwiJlksJFlEwq4ACLjAo6IKyYgwuUGDcQEC57xoCAqJcBFzuWSgIEEIZGC7rQnERmCDkUjQmwyUXIOG3f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IWZ/IPz7pm8+eioTOL39kkunQZzkmSM8eExxqemD2+f5IszY3umz9s+M/27Z77+bib/eE2S2+SHA+FLc36bcCB5zxjjqiQZY3x3um1ji50nTlsXzMnkNfXtaTCv8bo6gIlmNtte3zyY5N8med0Y4+6ZRML3cvW/tPSDXLv/acGB4tgk564tmxhjfD/Je5PcMsk/Jzls7R+pmbyGTkpyq0yi9sZVddjagarqqVX1P6YPv5LkX8+M3TzJSpLz1rZdw29uLsrkLjlrbj/H9wcHmnl/o7m3n3UXJblJVd1sZpvX1QFMNLNVHpbkzVX1M5msZ06SQ9bt84Ukx1fVbaZvprCumYPFh5NcnuT5VXVEVd07k2UZ78jkH48Pq6oTq+qITK4+/3ySryf52PTj5VV1h6q6T5InJ/n09LgvSfLI6XOPymR98z8m+VB6b0ryqOn9bO+c5JRFfbPwI+qjSb6W5LSqun1V/XYmSzY4QIlmtsqpmbzB6V1J/inJrTN5A8Wsl2SydONLmfzQv+MyTxA2y3SJ0wMzWZbxuSR/l8l9m/90jPGWTN6Q9+zp2JFJHjRdyvGDTNZAfy+T5RxvSPKyJC+dHvddmbyh6dlJPpnJb2p+ae3Xzo2/zGS51BuSvCfJ/1rINws/oqbvz/nlTJZY/Z8kD8nkZx4HqBrDH3wCAIBr4kozAAA0RDMAADREMwAANEQzAAA0RDMAADREMwAANEQzAAA0RDMAADT+L1cZ6Di3r0UiAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 864x648 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.unique(titanic['class'])\n",
    "y = titanic_class.values\n",
    "print('x = ',x)\n",
    "print('y = ',y)\n",
    "\n",
    "fig = plt.bar(x,y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 不同的上船港口乘客仓位等级幸存分布"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "# embarked 上船港口\n",
    "# class 仓位等级\n",
    "# survived 幸存"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "embarked =  ['C' 'Q' 'S']\n",
      "class =  ['First' 'Second' 'Third']\n"
     ]
    }
   ],
   "source": [
    "embarked = np.unique(titanic['embarked'].dropna())\n",
    "class_ = np.unique(titanic['class'].dropna())\n",
    "\n",
    "print('embarked = ',embarked)\n",
    "print('class = ',class_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>embarked</th>\n",
       "      <th>C</th>\n",
       "      <th>Q</th>\n",
       "      <th>S</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>First</th>\n",
       "      <td>85</td>\n",
       "      <td>2</td>\n",
       "      <td>127</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Second</th>\n",
       "      <td>17</td>\n",
       "      <td>3</td>\n",
       "      <td>164</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Third</th>\n",
       "      <td>66</td>\n",
       "      <td>72</td>\n",
       "      <td>353</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "embarked   C   Q    S\n",
       "class                \n",
       "First     85   2  127\n",
       "Second    17   3  164\n",
       "Third     66  72  353"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data1 = titanic.groupby(['class','embarked'])['survived'].count()\n",
    "data1 = data1.unstack()\n",
    "data1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x1182e7ef0>"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAs0AAAIeCAYAAABA5TIAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xu0XWV97//Pl3sgkoAkRS4hgD8rFT2IQdEGhHraHlHhZ6G12FKxSrDWyzltUQ9IRQqn6sFWhaEVgQH+FLRUK/V66uAiCnIJilhEi4UEEiJEEgoKKMbn98deydmE4LOTfU3yeo2xBlnzsuaz9mSN8c7Ms+au1loAAIAnt8VkDwAAAKY60QwAAB2iGQAAOkQzAAB0iGYAAOgQzQAA0CGaAQCgQzQDAECHaAYAgA7RDAAAHVtN9gDWZZdddmlz586d7GEAALAJu+mmm37cWps1km2nZDTPnTs3CxcunOxhAACwCauqxSPd1vQMAADoEM0AANAhmgEAoEM0AwBAh2gGAICOKXn3jJ4HH3ww9913Xx577LHJHspmaeutt87s2bOz4447TvZQAAAmxEYXzQ8++GDuvffe7L777pk2bVqqarKHtFlpreWRRx7J0qVLk0Q4AwCbhY1uesZ9992X3XffPdtvv71gngRVle233z6777577rvvvskeDgDAhNjoovmxxx7LtGnTJnsYm71p06aZHgMAbDY2umhO4grzFOAcAACbk40ymgEAYCJtdF8EfDJz3/H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gxN1fjvrbXbMzQ9Y06S05I8K0PTPc4bbLtbkhWtteGTapcPlgMAwEZjfaP5j5P8zyRnVdUBST6Q5OmttS+21u5IcnaSw6pq28H2tdb+lWSd80GqakFVLayqhat/ix0AAEwF3WiuqllVdXCStNb+o7X23iS3JzmutfZga23lsM1XZCiMd0yyNMnOVTX8y4azktyzruO01s5trc1rrc2bNWvWBr4dAAAYeyO50nxAkm8Mu3q82qqquq6q3jls2dwkD7XWlif5WoYC+oXD1s9PcuUoxgsAABNuJNF8fZIfJ/mbqtp98EXAZyW5LMn/SfL6qnpeVT0nyV8k+WiStNaWJfl8kjOrau+qOjrJ4UkuGIf3AQAA46Z7n+bW2oNV9Yokf5/kjUmWZGhqxjVVtTBDd9D4cobulPHpJMOvPC/I0BcDb83Q1I03ttZuHNu3AAAA42tEv9xkELrz17H8Z0neMnisa7/lSY4azQABAGCyjfQ3Ak59p82YpOP+5+QcFwCACbO+t5xjjNx111058sgjs+OOO2afffbJBz/4wcke0uMsWrQoVWvfMRAAYPO06Vxp3sgcffTROeCAA3LbbbflhhtuyB/8wR9k//33z0te8pLJHhoAAGtxpXkSrFy5MgsXLswJJ5yQ3XffPa985SvzZ3/2Z7njjjsme2gAAKyDaJ4EM2bMyNOe9rS85z3vyY9//OMkyYc+9KGccMIJSZILL7ww++23X6ZPn57DDjsst95665p977333rzqVa/KTjvtlN133z2nnXZaWvu/v2Tx4osvzn777ZeddtopxxxzTJYtW5bk/063+Pa3v53nPe952X777XP44Ydn9W9f/OUvf5lTTz01u+66a3bddddcfPHFE/XjAACY8kTzJNhiiy3yL//yL7n11luz55575sQTT8zdd9+dJPnnf/7nvP/9788FF1yQ7373u5k3b16OOeaYJENhe+SRR+aRRx7JwoULc+mll+bss8/ORRddlCT58pe/nNe97nU5/fTTc9NNN6W1lpe97GVZtWrVmmMfd9xxOf300/Ptb38799xzT84555wkyXnnnZdzzjknn/zkJ3PllVfm0ksvneCfCgDA1GVO8ySZN29ebrvttlx22WV597vfnQMOOCBf/epX89GPfjQ//OEP89KXvjTJUCg/9NBDWbZsWe66667ccMMNuffeezN79uzsu+++ueyyyzJ9+vQkydlnn53XvOY1+f3f//0kyfnnn59ddtklV199dfbee+8kySmnnJKXvexlSZLf+73fy1133ZUk+dSnPpU/+ZM/WTOn+owzzsjLX/7yCf2ZAABMVa40T4L7778/3/nOd7LFFlvkla98ZW688cYceOCBedvb3pa77rorb33rW3PzzTfn5ptvzi233JI777wzu+yySxYvXpwddtghs2fPXvNa8+fPzwEHHJAkWbx4cZ7+9KevWTdz5szssssuWbRo0Zplq2M8Sbbddts1UzuWLVuWvfbaa826fffdd7zePgDARkc0T4Krr746L3jBC9ZMm9h6663z27/921mxYkXmzJmT++67L3Pnzs3cuXMzffr0vOc978n999+fvfbaKz/96U9z3333rXmt973vfXnDG96QJNlrr71y++23r1n3wAMPZPny5Zk7d+6aZTNnzlznmHbdddcsWbJkzfPFixeP5VsGANioieZJMH/+/EybNi1/+Zd/mSVLluS6667LRz/60bz85S/PggULcskll+TSSy/NkiVL8ra3vS2XX355Zs+enYMOOigHHXRQTjjhhNxxxx355je/mQ984APZf//9kyRvetOb8vGPfzyXXnpp7rzzzrzuda/Lc57znBx66KHdMR1zzDG56KKLctVVV+X73/9+TjnllPH+MQAAbDTMaZ4Es2bNype+9KX81V/9VZ75zGdmp512yrHHHpt3vvOd2WabbXLOOefk1FNPzZIlS3LwwQfni1/8YrbYYujvN5dddlne8pa35MADD8yOO+6YN77xjfnzP//zJMkRRxyRc889N6eeemp+9KMf5bd+67fyhS98IVtuuWV3TKu/jPiqV70q2267bY477rjcdNNN4/pzAADYWNTw25VNFfPmzWsLFy5c57rbbrst++233wSPiHVxLgBg6nj2Rc+e7CFssO++5ruTctyquqm1Nm8k25qeAQAAHaIZAAA6RDMAAHSIZgAA6BDNAADQIZoBAKBDNAMAQIdoBgCAjk3mNwJO1g29J+tm3AAATBxXmifBVVddlap6wuOwww7L8ccfn9NOO637GnPnzs1VV101qnGM9FgAAJs70TwJ5s+fn5UrV2blypXZc8898773vS8rV67MF77whRG/xi233JL58+eP4ygBAFhtk5mesTHZaqutMnPmzCTJFltskWnTpq15PlI77rjjeAwNAIB1cKV5CvrlL3+Zt7/97dlpp50ye/bsfOxjH3vCNk82PWPu3Lm54oor8rd/+7fZe++985GPfGTNultuuSUvetGLsv322+elL31pHnjggfF8GwAAmwzRPAWde+65uffee3PTTTflpJNOypvf/OY8+uijI97/tNNOyze/+c18+MMfzpFHHpkk+fnPf56jjjoqv/7rv57vfe97OeKII3LZZZeN11sAANikiOYpaOedd87555+fffbZJ295y1vys5/9LPfee++I96+qfO5zn8tLX/rS7L777kmS6667LosWLcr73//+zJ07N29+85szb9688XoLAACbFNE8Bf3O7/xOttxyyyTJtttumyRprY14/5NOOilbbPH4U7ts2bI85SlPyc4777xm2b777jsGowUA2PSJ5ilofb8UuLbp06c/Ydmuu+6an/zkJ/nP//zPNcsWL148quMAAGwuRPNm4vnPf3722GOPnHTSSVm8eHH+4R/+Idddd91kDwsAYKMgmjcT06ZNy+c+97nccsstefazn53PfvazOeKIIyZ7WAAAG4VN5j7NG+uvs160aNHjnl944YVP2GZd85nX3q+3PEkOPPBAV5cBADaAK80AANAhmgEAoEM0AwBAh2gGAICOjTKa1+cXfTA+nAMAYHOy0UXz1ltvnUceeWSyh7HZe+SRR7L11ltP9jAAACbERhfNs2fPztKlS/Pwww+72jkJWmt5+OGHs3Tp0syePXuyhwMAMCE2uvs077jjjkmSe+65J4899tgkj2bztPXWW+fXfu3X1pwLAIBN3UYXzclQOAs2AAAmykY3PQMAACaaaAYAgA7RDAAAHaIZAAA6RDMAAHSIZgAA6BDNAADQIZoBAKBDNAMAQIdoBgCADtEMAAAdohkAADpEMwAAdIhmAADoGFE0V9WeVfXlqnqoqu6oqtcOW3d8Vd1ZVQ9X1Veq6mnD1s2uqsuq6qdVdXdVnTgebwIAAMbTSK80fzLJ4iTPTHJSkvOq6llVdVCSjyU5Ocl+g9e7YNh+5yeZkWT/JG9Nck5V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iOT/EOSzyS5LMkvkzwvybYZiufhDkjyX1prt61jXPsm+V9JvtZa+8dhy/8oyS5JLhy2bNskL6qqJRkK+lcNXvO2qvrY4D0CbDZEM8DYm5PkZxkK2OEOytDV3NUeWce+i1prq5Kktdaq6q4kq68075GhK9S/keS7SR5OssNa+//LkwRzkpyc5L1J3lJV+w3bbk6Sa5Icv9b292coprdOsnjY8v+IaAY2M6ZnAIy9uzJ0pfaXrbVFrbVFSQ5LMmME+86pqi2SoTnMGQrlZYN15yS5M8ns1trhSb60jv1/8ite+32ttZOTnJvkA2uNd88ki4eNd0GS5yb5cZJfDMax2l4B2MyIZoCxd2OSm5N8uKqePph+8YEMXX3u2S3J6YN5xv8zyVOTfHGwbkaSLZPMrqpjkrwrSa3HuH4w+O8ZSQ6qqqMGzz+Z5NeSvLuq9qiqN2RoPvSywVXvzyV5Z1U9s6oOz9CUEYDNimgGGGOD0HxFhiL5hiQXZ+gLf3ePYPcbkvw/GZp+8UdJjmmt3TVY91cZmsv8wyRvTnJ2kv2qavv1HN+KwXj+rqq2ba3dneR3kvzXJN9P8udJfq+1dvtglzdm6Gr09RmK/3984qsCbNqqtTbZYwAAgCnNlWYAAOgQzQAA0CGaAQCgQzQDAECHaAYAgA7RDAAAHaIZAAA6RDMAAHT8/4UNMf8Ek2xdAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 864x648 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "data1 = titanic.groupby(['class','embarked'])['survived'].count()\n",
    "data1 = data1.unstack()\n",
    "x_data = range(len(data1.columns))\n",
    "x_data = pd.Series(x_data)\n",
    "width = 0.2\n",
    "xmean = x_data.mean()\n",
    "for i,p in enumerate(data1.index):\n",
    "    plt.bar(x_data + width * (i - xmean),data1.loc[p],label=p,width = width)\n",
    "\n",
    "plt.xlabel(data1.columns.name,fontsize = 15)\n",
    "plt.legend()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "286px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
